package kr.saeildamil.androidstudy.ch12;

import java.util.ArrayList;

import kr.saeildamil.androidstudy.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

public class HwListIconText extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch12_listviewtest);
		String str = "스마트폰";
		String str1 = "스마트폰, 안드로이드4.2(젤리빈), 옥타코어 1.6GHz, 5.0인치 441ppi 풀HD 슈퍼아몰레드, 터치스크린, 1080 x 1920, 1300만화소(후면), 200만화소(전면), 자동초점, 터치초점, 얼굴인식, 스마일샷, LED플래시, HD동영상, 손떨림방지, 지오태깅, MP3";
		String str2 = "스마트폰, iOS6, A6프로세서, 4.0인치 Retina LCD, 터치스크린, 1136x640, 800만화소(후면), 120만화소(전면), 자동초점, LED플래시, 지오태깅, 터치포커스, 얼굴인식, 파노라마, MP3";
		String str3 = "스마트폰, 안드로이드4.1(젤리빈), 쿼드코어 1.7GHz, 5.5인치 Full HD IPS, 터치스크린, 1920X1080, 1300만화소(후면), 210만화소(전면), 자동초점, 얼굴인식, 손떨림방지, LED플래시, 지오태깅, MP3";
		ArrayList<HwMyItem> arList = new ArrayList<HwMyItem>();
		arList.add(new HwMyItem(R.drawable.hw_galaxy, "삼성 갤럭시S4",R.drawable.hw_g, str));
		//arList.add(new HwMyItem(R.drawable.hw_iphone, "애플 아이폰5",R.drawable.hw_i,str2));
		//arList.add(new HwMyItem(R.drawable.hw_optimus, "LG옵티머스GPro",R.drawable.hw_o,str3));
		
		HwMyListAdapter adapter = new HwMyListAdapter(this, R.layout.hw_ch12_icontext, arList);
		
		ListView listView = (ListView) findViewById(R.id.ch12_listviewtest_list);
		listView.setAdapter(adapter);
	}
}
